package com.holly.unit.bpmn.activiti.pojo;

import com.holly.unit.core.pojo.request.BaseRequest;
import com.holly.unit.scanner.api.annotation.field.ChineseDescription;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.util.Map;

/**
 * 类描述: 添加申请草稿状态参数封装
 *
 * @author fxr
 * @version 1.0.0
 * @date 2022/3/3 9:26
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ProcessBusiAddDraftRequest extends BaseRequest{

    @NotNull(message = "流程定义id不能为空", groups = {addDraft.class})
    @ChineseDescription("流程定义id")
    private String procDefId;
    @NotNull(message = "流程定义标题不能为空", groups = {addDraft.class})
    @ChineseDescription("流程定义标题")
    private String procDeTitle;
    @NotNull(message = "业务数据库表不能为空", groups = {addDraft.class})
    @ChineseDescription("业务数据库表")
    private String tableName;
    @NotNull(message = "应用id不能为空", groups = {addDraft.class})
    @ChineseDescription("应用id")
    private String appId;
    @NotNull(message = "业务数据库表字段不能为空", groups = {addDraft.class})
    @ChineseDescription("业务数据库表字段")
    private String filedNames;

    @NotNull(message = "业务数据库表字段值不能为空", groups = {addDraft.class})
    @ChineseDescription("业务数据库表字段值")
    private Map<String,Object> formDataMap;

    @NotNull(message = "表单类型不能为空", groups = {addDraft.class})
    @ChineseDescription("1、手动表单，2、表单设计器表单")
    private Integer type;

    /**
     * 参数校验分组：添加草稿校验
     */
    public @interface addDraft {
    }

}
